﻿namespace ExamV5
{
    using System;
    using System.Configuration;
    using System.Web.UI;
    using System.Web.UI.HtmlControls;
    using System.Web.UI.WebControls;

    public class FrmVersion : Page
    {
        protected HtmlForm Form1;
        protected Label labLink;
        protected Label labProName;
        protected Label labURL;
        protected Label labVersion;

        protected void Page_Load(object sender, EventArgs e)
        {
            this.labProName.Visible = true;
            this.labLink.Visible = true;
            this.labVersion.Visible = true;
            this.labURL.Visible = true;
            if (ConfigurationManager.ConnectionStrings["WriteInfo"].ConnectionString.Trim() == "1")
            {
                if (this.labProName.Text.IndexOf("平凡网上考试学习系统") != -1)
                {
                    this.labLink.Text = "联系方式:Tel:0791-85256515、QQ:394403692";
                    string connectionString = "";
                    if (ConfigurationManager.ConnectionStrings["OnlineNum"].ConnectionString.Length != 1)
                    {
                        if (ConfigurationManager.ConnectionStrings["OnlineNum"].ConnectionString.Length == 2)
                        {
                            connectionString = "0" + ConfigurationManager.ConnectionStrings["OnlineNum"].ConnectionString;
                        }
                        else
                        {
                            connectionString = ConfigurationManager.ConnectionStrings["OnlineNum"].ConnectionString;
                        }
                    }
                    else
                    {
                        connectionString = "00" + ConfigurationManager.ConnectionStrings["OnlineNum"].ConnectionString;
                    }
                    this.labVersion.Text = "产品版本:V5.0 Build V5" + connectionString + "H110812";
                    this.labURL.Text = "<div><a href='http://www.jxpfexam.com' style='TEXT-DECORATION: underline' onfocus='this.blur();' target='_blank'><font color='black'>版权所有(C) 2005-2015 中国\x00b7南昌市西湖区平凡电脑商行</font></a></div>";
                }
                else
                {
                    base.Response.Write("<script>alert('警告：此系统版权属于南昌市西湖区平凡电脑商行,您非法篡改了相关信息！软件作者：程平平(13870606104)')</script>");
                }
            }
        }
    }
}

